﻿using FileSystem.Impl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileSystem.impl.Actions
{
    public class CWD : ActionABC, IAction
    {
        public CWD()
            : base(new HelpDescription() { Name = "cwd", Description = "prints current directory" })
        {
            
        }
    
        #region IAction Members

        public override IResult execute()
        {
            AppResources resources = AppResources.getInstance();
            IFSDirectory cwd = resources.getFileSystem().CurrentDirectory;

            return new Result(cwd.getFQName());
        }

        #endregion

    }
}
